<div class="container" ng-controller="mainCtrl">
  <h1 class="text-center">API服务器</h1>
  <br>
  <form class="form-horizontal" name="form">
    <div class="form-group">
      <label class="col-sm-2 control-label">账号：</label>
      <div class="col-sm-10">
        <input type="text" class="form-control" validator="required" ng-model="user.name">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">密码：</label>
      <div class="col-sm-10">
        <input type="password" class="form-control" validator="required" ng-model="user.password" ng-keydown="keydown($event);">
      </div>
    </div>
    <!-- <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <div class="checkbox">
          <label>
            <input type="checkbox" checked="" ng-model="isCookie" ng-init="isCookie=true;">是否保存
          </label>
        </div>
      </div>
    </div> -->
    <div ng-if="message" class="col-sm-offset-2 col-sm-10 alert alert-danger" role="alert">
      <span  class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
      <span  class="sr-only">Error:</span>
      <span ng-bind="message"></span>
    </div>
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <button type="button" validation-submit="form" class="btn btn-primary" ng-click="submit();">登陆</button>
      </div>
    </div>
  </form>
</div>